﻿using Mysoft.Common.Attributes.AutoMapping;
using Mysoft.Dto.Basic;
using Mysoft.Entity;
using System.ComponentModel.DataAnnotations;

namespace Mysoft.Dto
{
    [CreateMapper(SourceType = new []{ typeof(Sys_User) })]
    public class UserDto : DtoBase
    {
        /// <summary>
        /// 用户姓名
        /// </summary>
        [Required(ErrorMessage = "用户姓名不能为空")]
        public string? Name { get; set; }
        /// <summary>
        /// 用户账号
        /// </summary>
        [Required(ErrorMessage = "用户账号不能为空")]
        public string? Code { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [Required(ErrorMessage = "用户密码不能为空")]
        public string? Password { get; set; }

        /// <summary>
        /// token
        /// </summary>
        public string? Token { get; set; }
    }
}
